home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 1 / MacMania 1.toast / Hypercard / HyperCard' More / J-M / KeyMess / Key Messages / Key Messages.txt < prev    next >
Encoding:
Text File  |  1989-03-01  |  568 b   |  3 lines  |  [TEXT/ttxt]

  1. Key messages
  2.  
  3. This stack by David Bogartz shows a quick and very dirty way to get HyperCard to send a message when the user presses a key (other than return, tab, and the arrow keys).  It doesn't work for number keys, and it probably isn't right for some applications, but it's simple and will probably work in many cases. The basic idea is that there is an idle handler in the background script that looks in the message box and grabs whatever is there.  Then, for each keystroke, it generates the event "key" with the character that the user pressed as a parameter.